package com.test.string;

import java.io.File;

public class Substring {

	public static void main(String[] args) {
		String vodRoot = "/webapps/appdata/vod";
		String inpath = "/aaa/ccc/xxx.avi";
		
		String fullinpath = vodRoot + inpath;
		System.out.println("fullinpath: " + fullinpath);
		File infile = new File(fullinpath);
		String fulloutpath = fullinpath.substring(0, fullinpath.length() - infile.getName().length()) + "L_" + infile.getName();
		
		System.out.println("fulloutpath: " + fulloutpath);
		
		String outpath = fulloutpath.substring(vodRoot.length());
		System.out.println("outpath: " + outpath);
	}
}
